package com.myoffice.model;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TSysfun entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "T_SYSFUN", schema = "OA")
public class TSysfun implements java.io.Serializable {

	// Fields

	private String id;
	private TSysfun TSysfun;
	private String text;
	private String nodeurl;
	private Integer displayoder;
	private Set<TSysfun> TSysfuns = new HashSet<TSysfun>(0);

	// Constructors

	/** default constructor */
	public TSysfun() {
	}

	/** minimal constructor */
	public TSysfun(String id, String text) {
		this.id = id;
		this.text = text;
	}

	/** full constructor */
	public TSysfun(String id, TSysfun TSysfun, String text, String nodeurl,
			Integer displayoder, Set<TSysfun> TSysfuns) {
		this.id = id;
		this.TSysfun = TSysfun;
		this.text = text;
		this.nodeurl = nodeurl;
		this.displayoder = displayoder;
		this.TSysfuns = TSysfuns;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PID")
	public TSysfun getTSysfun() {
		return this.TSysfun;
	}

	public void setTSysfun(TSysfun TSysfun) {
		this.TSysfun = TSysfun;
	}

	@Column(name = "TEXT", nullable = false)
	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@Column(name = "NODEURL")
	public String getNodeurl() {
		return this.nodeurl;
	}

	public void setNodeurl(String nodeurl) {
		this.nodeurl = nodeurl;
	}

	@Column(name = "DISPLAYODER", precision = 6, scale = 0)
	public Integer getDisplayoder() {
		return this.displayoder;
	}

	public void setDisplayoder(Integer displayoder) {
		this.displayoder = displayoder;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TSysfun")
	public Set<TSysfun> getTSysfuns() {
		return this.TSysfuns;
	}

	public void setTSysfuns(Set<TSysfun> TSysfuns) {
		this.TSysfuns = TSysfuns;
	}

}